const db = uniCloud.database();
module.exports = async function() {
	const token = this.getUniIdToken();
	if (!token) {
		throw new Error('非法请求');
	}
	await db.collection('uni-id-users').where({ token }).update({
		mobile: db.command.remove(),
		mobile_confirmed: db.command.remove()
	})
	return {
		code: 0,
		msg: '解绑成功'
	}
}